package com.zhenzhen.xszhcp.serviceImpl;

import com.zhenzhen.xszhcp.mapper.GroupinfoMapper;
import com.zhenzhen.xszhcp.model.Groupinfo;
import com.zhenzhen.xszhcp.service.GroupinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;
@Component
public class GroupinfoServiceImpl implements GroupinfoService {
    @Autowired
    private GroupinfoMapper mapper;
    @Override
    public List<Groupinfo> getGroupinfoList(Map paramMap) {
        return mapper.getGroupinfoList(paramMap);
    }

    @Override
    public Groupinfo getGroupinfoById(int id) {
        return mapper.selectByPrimaryKey(id);
    }

    @Override
    public int insertGroupinfo(Groupinfo groupinfo) {
        return mapper.insertSelective(groupinfo);
    }

    @Override
    public int delGroupinfo(int id) {
        return mapper.deleteByPrimaryKey(id);
    }

    @Override
    public int upGroupinfo(Groupinfo groupinfo) {
        return mapper.updateByPrimaryKeySelective(groupinfo);
    }
}
